{% extends "base.jinja" %}

{% block css %},main.css{% endblock %}

{% block pagetype %}post{% endblock %}

{% block main %}
	<div class="layout mt-crumb">
        <a href="/">首页</a>&nbsp;>&nbsp;<b>分享视频</b>
    </div>

	<div class="layout page" id="p-post">
		<div class="post-main">
			<form method="post" action="">
				<div class="p-video-data" id="p-upload">
					<input type="hidden" name="cover" value="" id="cover" />
					<div class="pvd-cover" data-error="上传一张新的封面吧,0,-54">
						<img src="http://s.lovewith.me/static/images/blank.gif" />
						<div class="pv-add"><span id="pv-add-btn" class="up-add-btn">重新上传封面</span></div>
					</div>
					<div class="pvd-tag">
						<h4>输入标签</h4>
						<div class="tagHandler">
							<ul class="up-tag tagHandlerContainer">
								<li class="tagInput">
									<input class="tagInputField" type="text" placeholder="空格或者回车隔开" />
								</li>
							</ul>
						</div>
						<div class="up-color"><a class="ui up-color-btn" href="javascript:;" title="选择颜色"></a></div>
					</div>
					<a href="javascript:;" class="ui up-cancel" title="取消"></a>
				</div>
				
				<div class="p-video" id="p-video" data-error="没有上传视频,30,-24">
					<input id="video-url" data-error="视频地址错误，目前仅支持优酷,0,-54" placeholder="输入视频网址，目前仅支持优酷" type="text" name="" value="输入视频网址，目前仅支持优酷" class="inp-text" />
					<a href="javascript:;" class="inp-btn-pk p-video-btn">确定</a>
				</div>

				<div class="pm-color" id="pm-color">
					{% for color in colors %}
						<a href="javascript:;" data-color="{{color.color}}" data-id="{{color.id}}" style="background-color:{{color.color}}" class="ui-a" title="{{color.name}}"></a>
					{% endfor %}
				</div>

				<div class="pm-cont">
					<div class="pm-cont-title">
						<input autocomplete="off" data-error="写个标题吧,-11,-60" class="inp-text pm-title" type="text" name="title" value="" placeholder="输入标题" />
					</div>
					<div class="pm-cont-box">
						<div class="edit-bar" id="edit-bar">
				            <div class="ed-bold" title="加粗"></div>
				            <div class="ed-italic" title="斜体"></div>
				            <div class="ed-link" id="link" title="连接"></div>
				            <div class="ed-unlink" title="取消连接"></div>
				            <div class="ed-format" title="清除格式"></div>
				        </div>
				        <textarea id="edit_holder" class="edit_holder" placeholder="输入描述"></textarea>
					</div>
				</div>
				
				<div class="pm-tags" id="pm-tags"></div>
				<div class="error-tips"><span></span></div>
				<div class="pm-btn"><a class="inp-btn-pk-m post-btn" href="javascript:;">发 布</a></div>
			</form>
		</div>
		<div class="post-sub">
			<dl class="cus-select p-secate" id="p-secate" data-error="没选择类目呢,0,-48">
				<input type="hidden" autocomplete="off" name="cate-id" id="cate-id" value="" />
				<dt class="ui-a">选择类目</dt>
	            <dd>
	            	<ul>
	            		{% for cate in cate_data %}
							<li><a href="javascript:;"  data-cid="{{cate.id}}">{{cate.name}}</a></li>
						{% endfor %}
	            	</ul>
	            </dd>
	        </dl>

	        {% if is_supplier %}
			<div class="p-scheduled">
				<label class="inp-checkbox"><input type="checkbox" name="scheduled-enable" value="1" />可预定</label>
			</div>
			{% endif %}

			<div class="post-sub-collect"><a href="{{domain}}site/collection/" target="_blank">安装采集工具></a></div>
		</div>
	</div>
{% endblock %}

{% block script %}
<script src="http://s.lovewith.me/static/js/page/post/edit/ueditor.all.min.js"></script>
<script src="http://s.lovewith.me/static/js/page/post/edit/ueditor.config.js"></script>
<script>seajs.use('page/post-video', function(p){p.render()});</script>
{% endblock %}
